package test.marui.com.mytest.view.photoOperation;

import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;

import test.marui.com.mytest.R;


/**
 * Created by MR on 2019/5/22.
 */
public class PhotoOperationActivity extends AppCompatActivity implements View.OnClickListener {

    private ImageView iv_scan;
    private List<Uri> imageList = new ArrayList<>();


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_photo_operation);

        TextView tv_save = findViewById(R.id.tv_save);
        TextView tv_delete = findViewById(R.id.tv_delete);
        TextView tv_scan_last = findViewById(R.id.tv_scan_last);

        iv_scan = findViewById(R.id.iv_scan);

        tv_save.setOnClickListener(this);
        tv_delete.setOnClickListener(this);
        tv_scan_last.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_save:
                break;
            case R.id.tv_delete:
                break;
            case R.id.tv_scan_last:
                if (imageList.size()>0){
                    iv_scan.setImageURI(imageList.get(imageList.size()-1));
                }
                break;
        }
    }
}
